package main;

import java.awt.Canvas;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Point;
import java.util.Observable;

import javax.swing.JFrame;

public class GameViewer extends JFrame implements java.util.Observer{

	Canvas myCanvas;
	LotusEngine myEngine;
	
	public GameViewer()
	{
		newCanvas();
	}
	
	public void setEngine(LotusEngine engine)
	{
		myEngine = engine;
	}
	
    public void newCanvas()
    {
        this.removeAll();
        myCanvas = new Canvas();
        this.add(myCanvas);
    }
    
    public void paintSprite(Image img, Point p)
    {
        Graphics g = myCanvas.getGraphics();
        g.drawImage(img, p.x, p.y, null);   
    }

	@Override
	public void update(Observable myEngine, Object arg1) {
		// TODO Auto-generated method stub
		
	}
	
}